Produced by Araxis Merge on 2021-05-13 09:09:01 +0000. See www.araxis.com for information about Merge. This report uses XHTML and CSS2, and is best viewed with a modern standards-compliant browser. For optimum results when printing this report, use landscape orientation and enable printing of background images and colours in your browser.
| # | Location | File | Last Modified |
|---|---|---|---|
| 1 | /Applications/Ampps/www/Porto 3.2.2/Theme Files/Magento 2.x/Porto Theme/app/design/frontend/Smartwave/porto/Magento_Catalog/templates/category | config.phtml | 2016-11-23 20:09:38 +0000 |
| 2 | /Applications/Ampps/www/Porto v4.0.0/Theme Files/Magento 2.x/Porto Theme/app/design/frontend/Smartwave/porto/Magento_Catalog/templates/category | config.phtml | 2021-02-05 01:05:20 +0000 |
| Description | Between Files 1 and 2 | |
|---|---|---|
| Text Blocks | Lines | |
| Unchanged | 3 | 16 |
| Changed | 1 | 78 |
| Inserted | 0 | 0 |
| Removed | 2 | 5 |
| Whitespace | Consecutive whitespace is treated as a single space |
|---|---|
| Character case | Differences in character case are significant |
| Line endings | Differences in line endings (CR and LF characters) are ignored |
| CR/LF characters | Not shown in the comparison detail |
| Active line-pairing rules |
No regular expressions were active.
| 1 | <?php | |||||
| 2 | $porto_helper = $this->helper('Smartwave\Porto\Helper\Data'); | |||||
| 3 | $page_layout = $porto_helper->getConfig('porto_settings/category/page_layout'); | |||||
| 4 | ?> | |||||
| 5 | <script type="text/javascript"> | 1 | <script type="text/javascript"> | |||
| 6 | require([ | 2 | require([ | |||
| 7 | 'jquery' | 3 | 'jquery' | |||
| 8 | ], function ($) { | 4 | ], function ($) { | |||
| 9 | $(document).ready(function(){ | 5 | // sticky filter on mobile | |||
| 10 | <?php if($page_layout != "page-layout-2columns-left"): ?> | 6 | $(window).load(function(){ | |||
| 11 | if($("body").hasClass("page-layout-2columns-left")) { | 7 | if ($('.toolbar').length > 0) { | |||
| 12 | $("body").removeClass("page-layout-2columns-left").addClass("<?php echo $page_layout; ?>"); | 8 | var init_filter_sticky = function() { | |||
| 13 | <?php if($page_layout == "page-layout-1column"): ?> | 9 | var $obj = $('#layer-product-list > .toolbar.toolbar-products'); | |||
| 14 | | 10 | if (!$obj.prev('.filter-placeholder').length) { | |||
| 15 | <?php endif; ?> | 11 | $('<div class="filter-placeholder m-0"></div>').insertBefore($obj); | |||
| 12 | } | |||||
| 13 | var sticky_height = 0; | |||||
| 14 | if($('.page-header.sticky-header').length > 0){ | |||||
| 15 | sticky_height = $('.page-header.sticky-header .header-main').outerHeight(); | |||||
| 16 | } | |||||
| 17 | var $ph = $obj.prev('.filter-placeholder'), | |||||
| 18 | scrollTop = $(window).scrollTop(), | |||||
| 19 | offset = sticky_height; | |||||
| 20 | if ($ph.offset().top <= scrollTop + offset) { | |||||
| 21 | $ph.css('height', $obj.outerHeight() + parseInt($obj.css('margin-bottom'))); | |||||
| 22 | $obj.addClass('sticky').css('top', offset); | |||||
| 23 | } else { | |||||
| 24 | $ph.css('height', ''); | |||||
| 25 | $obj.removeClass('sticky'); | |||||
| 26 | } | |||||
| 27 | }; | |||||
| 28 | if (window.innerWidth < 992) { | |||||
| 29 | window.removeEventListener('scroll', init_filter_sticky); | |||||
| 30 | window.addEventListener('scroll', init_filter_sticky, {passive: true}); | |||||
| 31 | init_filter_sticky(); | |||||
| 32 | } | |||||
| 33 | $(window).on('resize', function() { | |||||
| 34 | if (window.innerWidth < 992) { | |||||
| 35 | window.removeEventListener('scroll', init_filter_sticky); | |||||
| 36 | window.addEventListener('scroll', init_filter_sticky, {passive: true}); | |||||
| 37 | }else{ | |||||
| 38 | window.removeEventListener('scroll', init_filter_sticky); | |||||
| 39 | $('#layer-product-list > .toolbar.toolbar-products').removeClass('sticky').css('top', '').prev('.filter-placeholder').css('height', ''); | |||||
| 40 | } | |||||
| 41 | }); | |||||
| 42 | } | |||||
| 43 | }); | |||||
| 44 | // filter popup events | |||||
| 45 | » » $(document).on('click', '.sidebar-toggle', function(e) { | |||||
| 46 | » » » e.preventDefault(); | |||||
| 47 | » » » var $html = $('html'); | |||||
| 48 | var $obj = $('.columns | |||||
| 49 | if (!$obj.parents().find('.sidebar-overlay').length) { | |||||
| 50 | $('<div class="sidebar-overlay"></div>').insertBefore($obj); | |||||
| 51 | } | |||||
| 52 | if($('#ln_overlay').length) { | |||||
| 53 | var Isloader = $('#ln_overlay').detach(); | |||||
| 54 | if (!$obj.prev('#ln_overlay').length) { | |||||
| 55 | Isloader.insertBefore($obj); | |||||
| 56 | } | |||||
| 57 | } | |||||
| 58 | » » » if ($html.hasClass('sidebar-opened')) { | |||||
| 59 | » » » » $html.removeClass('sidebar-opened'); | |||||
| 60 | » » » » $('.sidebar-overlay').removeClass('active'); | |||||
| 61 | » » » } else { | |||||
| 62 | » » » » $html.addClass('sidebar-opened'); | |||||
| 63 | » » » » $('.sidebar-overlay').addClass('active'); | |||||
| 64 | » » » } | |||||
| 65 | » » }); | |||||
| 66 | ||||||
| 67 | » » $(document.body).on('click', '.sidebar-overlay', function() { | |||||
| 68 | » » » $('html').removeClass('sidebar-opened'); | |||||
| 69 | » » » $('html').removeClass('filter-sidebar-opened'); | |||||
| 70 | » » » $(this).removeClass('active'); | |||||
| 71 | » » }); | |||||
| 72 | ||||||
| 73 | » » $(window).on('resize', function() { | |||||
| 74 | » » » if (window.innerWidth > 991) { | |||||
| 75 | » » » » $('.sidebar-overlay').click(); | |||||
| 16 | } | 76 | » » » } | |||
| 17 | <?php endif; ?> | |||||
| 18 | }); | 77 | » » }); | |||
| 19 | }); | 78 | }); | |||
| 20 | </script> | 79 | </script> |
Araxis Merge (but not the data content of this report) is Copyright © 1993–2019 Araxis Ltd (www.araxis.com). All rights reserved.